/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package koor.entity;
import javax.persistence.*;

/**
 *
 * @author Admin
 */
@Entity
@Table(name = "users")
public class User extends AbstractEntity{

    @Column(name = "login")
    private String login;
    
    @Column(name = "password")
    private String password;
    
    @ManyToOne
    @JoinColumn(name = "role_id", referencedColumnName = "id")
    private Role role;
    
    @OneToOne
    @JoinColumn(name = "person_id", referencedColumnName = "id")
    private Person person;   

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public Person getPerson() {
        return person;
    }

    public void setPerson(Person person) {
        this.person = person;
    }

}
